//
//  CDShelfView.m
//  CDshelf
//
//  Created by wangjun on 11-4-22.
//  Copyright 2011年 __MyCompanyName__. All rights reserved.
//

#import "CDShelfView.h"
#import "CDRowView.h"
@implementation CDShelfView

- (id)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        
        //设置背景颜色
        UIImageView *backgroundView=[[UIImageView alloc] initWithImage:[UIImage imageNamed:@"cdshelf_background.jpg"]];
        [self addSubview:backgroundView];
        [backgroundView release];
        
        [self addCDrow];
    }
    return self;
}
- (void)dealloc
{
    [super dealloc];
}


//添加 cd架子 
-(void)addCDrow
{
    CDRowView *cdrow=[[CDRowView alloc] initWithFrame:CGRectMake(0, 0, 1024, 156) cdNumber:55 content:@"Classical"];
    [self addSubview:cdrow];
    [cdrow release];
    
    CDRowView *cdrow1=[[CDRowView alloc] initWithFrame:CGRectMake(0, 156, 1024, 156) cdNumber:35 content:@"Jazz"];
    [self addSubview:cdrow1];
    [cdrow1 release];
    
    CDRowView *cdrow2=[[CDRowView alloc] initWithFrame:CGRectMake(0, 156*2, 1024, 156) cdNumber:25 content:@"Piano"];
    [self addSubview:cdrow2];
    [cdrow2 release];
    
    CDRowView *cdrow3=[[CDRowView alloc] initWithFrame:CGRectMake(0, 156*3, 1024, 156) cdNumber:72 content:@"Male singer"];
    [self addSubview:cdrow3];
    [cdrow3 release];
}

@end
